package com.lxw.manage_cms.controller;

import com.lxw.api.cms.CmsPageControllerApi;
import com.lxw.framework.domain.cms.CmsPage;
import com.lxw.framework.domain.cms.request.QueryPageRequest;
import com.lxw.framework.model.response.CommonCode;
import com.lxw.framework.model.response.QueryResponseResult;
import com.lxw.framework.model.response.QueryResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
@RestController
public class CmsPageController implements CmsPageControllerApi {

    @Override
    @GetMapping("findList")
    public QueryResponseResult findList(Integer page, Integer pageSize, QueryPageRequest qpr) {
        QueryResult<CmsPage> queryResult = new QueryResult<>();
        CmsPage cmsPage = new CmsPage();
        cmsPage.setPageName("赵岩");
        List<CmsPage> list = new ArrayList<>();
        list.add(cmsPage);
        queryResult.setList(list);
        return new QueryResponseResult(CommonCode.SUCCESS,queryResult);
    }
}
